
     /* Capacity/Day across Team for a particular Iteration and for Particular User*/
CREATE proc [dbo].[TeamMembersCapacity] @ProjectNodeGUID nvarchar(255),@IterationSK int,@Domain nvarchar(255)
as begin
SELECT Con.DisplayPart,Tc.Capacity as 'Capacity per Day',iter.IterationPath,Team.TeamFieldValue as Team,
convert(date,StartDate) as 'IterationStart (YYYY-MM-DD)',convert(date,FinishDate) as 'IterationEnd (YYYY-MM-DD)'
  FROM [Tfs_FabrikamFiberCollection].[dbo].[tbl_TeamConfigurationCapacity] Tc inner join 
  [Tfs_FabrikamFiberCollection].[dbo].[Constants] Con on TC.TeamMemberId=con.TeamFoundationId  inner join
  [Tfs_FabrikamFiberCollection].[dbo].[tbl_TeamConfigurationTeamFields] Team on Tc.TeamId=Team.TeamId inner join
  [Tfs_Warehouse].[dbo].[DimIteration] iter on TC.IterationId=iter.IterationGUID 
  where iter.ProjectGUID=@ProjectNodeGUID and iter.IterationSK = @IterationSK and Con.DomainPart=@Domain 
  order by DisplayPart
   end


